package com.aaa.controller;

import com.aaa.entity.AliPay;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 荆豪峰
 * @version 1.0
 */
@RestController
public class HellController {
    @GetMapping("hello")
    public String hello() {
        return "hello";
    }
    @Autowired
    private AliPay aliPay;
    @GetMapping("/index")
    public AliPay index(){
        return aliPay;
    }


    @Value("${server.port}")
    private Integer port;

    @Value("${student.name}")
    private String name;

    @GetMapping("info")
    public String info(){
        return "服务器的端口号:"+port+";姓名:"+name;
    }
}
